package cn.itlaobing.servise;

import cn.itlaobing.BusinessException.MyBusinessException;
import cn.itlaobing.dao.ItlbGoodsDao;
import org.apache.log4j.Logger;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * 类名: cn.itlaobing.servise
 * 功能: itlbgoods的业务层
 * 作者: 王博
 * 日期: 2017/11/14 11:05
 */
public class ItlbGoodServise {

    private ItlbGoodsDao igd=new ItlbGoodsDao();


    public List<Map<String, Object>> QuerySix() throws MyBusinessException {
        List<Map<String, Object>> mapList=null;
        try {
            mapList=igd.QuerySix();
        } catch (SQLException e) {
            throw new MyBusinessException(e.getMessage());
        }
        return mapList;
    }

    /*
        查询最新上架
     */
    public List<Map<String, Object>> veryLatest() throws MyBusinessException {
        List<Map<String, Object>> mapList=null;
        try {
            mapList=igd.veryLatest();
        } catch (SQLException e) {
            throw new MyBusinessException(e.getMessage());
        }
        return mapList;
    }

}
